#include<bits/stdc++.h>

using namespace std;

//鸡兔同笼的二维查找方法
int main() {
    int n = 10, m = 28;
    //x+y=n 2*x+4*y=m
    int x, y;
    for (x = 0; x <= n; x++) {
        for (y = 0; y <= n; y++) {
            if (x + y == n && 2 * x + 4 * y == m)
                printf("(%d %d)", x, y);
        }
    }
    return 0;
}
